/*
 * VariableAst.h
 *
 *  Created on: 1 Nov 2010
 *      Author: kn308
 */

#ifndef VARIABLEAST_H_
#define VARIABLEAST_H_

#include <MAlice/Ast/ExpressionAst.h>

namespace MAlice
{

class VariableAst: public ExpressionAst
{
private:
	bool           mParam;
	string         mName;
	ExpressionAst* mOffset;

public:
	VariableAst(const string& name);
	VariableAst(const string& name, ExpressionAst* offset);

	virtual ~VariableAst();

	virtual llvm::Value* generate();

	Value* getPointer();

	inline const string& getName() const
	{
		return mName;
	}
};

}

#endif /* VARIABLEAST_H_ */
